import App from "./App";

// #ifndef VUE3
import Vue from "vue";
import "./uni.promisify.adaptor";
Vue.config.productionTip = false;
App.mpType = "app";
const app = new Vue({
	...App,
});
app.$mount();
// #endif

// #ifdef VUE3
import { createSSRApp } from "vue";
export function createApp() {
	const app = createSSRApp(App);
	return {
		app,
	};
}
// #endif

/**
 * 图片的路径
 */
Vue.prototype.imageURL = "/static/"; //本地路径
// Vue.prototype.imageURL = "https://"; //网络路径
Vue.prototype.getImageURL = function (url) {
	return Vue.prototype.imageURL + url;
};
/**
 * 导航栏
 */
import navigationBar from "@/components/navigationBar/navigationBar.vue";
Vue.component("navigationBar", navigationBar);
/**
 * 主色
 */
Vue.prototype.$themeColor = "#606DCE";

/**
 * js方法
 */
import filter from "@/utils/filters.js";
Vue.prototype.$filters = filter;

/**
 * 点击事件 参数带 handle 回调方法的
 */
Vue.prototype.$handle = function(item) {
	return item.handle(item)
}

/**
 * 导航栏的总高度
 */
Vue.prototype.$navigationHeight = (uni.getSystemInfoSync()["statusBarHeight"] + 45);

/**
 * 没有数据的空白占位
 */
import uEmpty from "@/components/emptyData/emptyData.vue";
Vue.component("uEmpty", uEmpty);
/**
 * 底部按钮
 */
import wrapFooter from "@/components/footer/footer.vue";
Vue.component("wrapFooter", wrapFooter);

/**
 * 吐司
 */
import st from "@/utils/showtoast.js";
Vue.prototype.$st = st;
/**
 * 存储的信息
 */
import stoarge from "@/utils/stoarge.js";
Vue.prototype.$stoarge = stoarge;